var express = require('express');
var router = express.Router();
var { MyFollow_Model,Report_Model,MyPrescription_Model,Physical_Model } = require("../mongoose/cyd")
/* GET home page. */
router.get('/', function (req, res, next) {
    res.render('index', { title: 'Express' });
});
/**获取所有检查报告数据接口 */
router.get("/MyFlwAll",async (req,res)=>{
    let data = await MyFollow_Model.find()
    res.send({
        data
    })
})
/**获取所有检验报告数据接口 */
router.get("/ReportAll",async (req,res)=>{
    let data = await Report_Model.find()
    res.send({
        data
    })
})
/**获取所有全部处方数据接口 */
router.get("/MtAll",async (req,res)=>{
    let data = await MyPrescription_Model.find()
    res.send({
        data
    })
})
/**获取所有体验报告数据接口 */
router.get("/PsAll",async (req,res)=>{
    let data = await Physical_Model.find()
    res.send({
        data
    })
})
module.exports = router;
